from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from content.form import SearchForm
from content.models import Goods


@csrf_exempt
def usercenter(request):
    top_5 = Goods.objects.order_by('-rating').all()[0:5]
    search_form = SearchForm()
    return render(request, 'manager/usercenter.html', {'top_5': top_5, 'search_form': search_form})

